Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Unique promotion tier ID.
Body
Provide the customer and order context.
Request schema model for validating a promotion using POST v1/promotions/tiers/{tierId}/validation
.
Customer's information. You can pass the unique customer ID that was assigned by Voucherify.
- Customer ID
- Customer Source ID
- Customer
Order information. You can pass the unique order ID that was assigned by Voucherify.
- Order ID
- Order Source ID
- Order Customer And Referrer Ids Objects
A set of key/value pairs that you can send in the request body to check against vouchers requiring redemption metadata validation rules to be satisfied. The validation runs against rules that are defined through the <!-- [Create Validation Rules](https://docs.voucherify.io/reference/create-validation-rules) -->Create Validation Rules endpoint or via the Dashboard; in the Advanced Rule Builder → Advanced → Redemption metadata satisfy or Basic Builder → Attributes match → REDEMPTION METADATA. Read more.
Response
Returns validation result in valid
key of the promotion tier object. Returns true
if the promotion tier rules and validation rules are satisfied given the request body parameters. Returns false
if the data provided in the payload does not meet validation rules or promotion tier requirements.
- Promotion Tier Valid
- Promotion Tier Not Valid
Response schema model for validating a promotion using POST v1/promotions/tiers/{tierId}/validation
.
Response schema model for valid promotion tier when validating a promotion using POST v1/promotions/tiers/{tierId}/validation
.
Indicates whether the promotion is valid within the context of the parameters provided in the request body and filters in the query parameters.
Contains list of items that qualify in the scope of the discount. These are definitions of included products, SKUs, and product collections. These can be discounted.
Contains list of items that do not qualify in the scope of the discount. These are definitions of excluded products, SKUs, and product collections. These CANNOT be discounted.
Hashed customer source ID.
This is an object representing an order with calculated discounts applied using the voucher code.
- Order object - Effect: Apply to order
- Order object - Effect: Apply to items
Unique promotion tier ID.
"promo_4TqHr24boFISDrcOHSlfAxwm"
Custom promotion tier name.
Text to be displayed to your customers on your website.
"Get 45% off items"
Contains information about the discount to be applied to the order. This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.
- Amount Discount
- Percent Discount
- Fixed Discount
- Unit Discount, Product
- Unit Discount, SKU
- Unit Discount, multiple items
- Shipping Discount
Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Campaign is inactive before this date.
"2022-11-02T00:00:00.000Z"
Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.
"2022-11-04T00:00:00.000Z"
The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
The calculated discount amount based on the discount type and effect.
The effective discount amount that would be applied to the order.
The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
The type of the object represented by JSON. This object stores information about the promotion tier.